package com.skyable.account.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.skyable.account.entity.SysCompany;
import com.skyable.common.common.ServiceResult;

import java.util.List;

/**
 * @author GaoYuan
 * @title: ICompanyService
 * @projectName private-cloud
 * @description: TODO
 * @date 2021/6/2921:09
 */
public interface ICompanyService extends IService<SysCompany> {

    /**
     * 新增租户
     * @param sysCompany
     * @return
     */
    ServiceResult<SysCompany> insertCompany(SysCompany sysCompany);

    /**
     * 更新租户
     * @param sysCompany
     * @return
     */
    ServiceResult<SysCompany> updateCompany(SysCompany sysCompany);

    /**
     * 分页获取租户列表
     * @param page
     * @param limit
     * @param sysCompany
     * @return
     */
    ServiceResult<IPage<SysCompany>> findCompanyListByPage(int page, int limit, SysCompany sysCompany);

    /**
     * 获取租户列表
     * @return
     */
    ServiceResult<List<SysCompany>> findCompanyList();

    /**
     * 根据ID查询租户信息
     * @param companyId
     * @return
     */
    ServiceResult<SysCompany> findCompanyById(Long companyId);

    /**
     * 删除租户
     * @param companyId
     * @return
     */
    ServiceResult<Integer> deleteCompanyById(Long companyId);
    
}
